Skip to content

Comments

issue_426#449

Closed
Brijesh-Thakkar wants to merge 7 commits intoexospherehost:mainfrom
Brijesh-Thakkar:issue_426
Closed

issue_426#449
Brijesh-Thakkar wants to merge 7 commits intoexospherehost:mainfrom
Brijesh-Thakkar:issue_426

Conversation

@Brijesh-Thakkar
Copy link

Currently, publish-dashboard.yml and publish-state-manager.yml workflows build each Docker image twice—once for DockerHub and once for GHCR.
i tried too make changes such that the work of building image is done only once

@gemini-code-assist
Copy link
Contributor

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

@safedep
Copy link

safedep bot commented Oct 1, 2025

SafeDep Report Summary

Green Malicious Packages Badge Green Vulnerable Packages Badge Green Risky License Badge

Package Details
Package Malware Vulnerability Risky License Report

This report is generated by SafeDep Github App.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 1, 2025

Warning

Rate limit exceeded

@Brijesh-Thakkar has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 19 minutes and 11 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 9f452c3 and 5e64473.

📒 Files selected for processing (2)
  • .github/workflows/publish-state-manager.yml (1 hunks)
  • docker-compose.yml (1 hunks)
📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added a docker-compose setup to run Dashboard and State Manager together with health checks, defaults, and a shared network.
    • Published multi-arch images (amd64/arm64) to both GHCR and Docker Hub with SBOM/provenance.
  • Tests

    • CI now runs Go-based tests for the State Manager against a MongoDB service.
  • Chores

    • Consolidated and simplified publish workflows; unified tagging/labeling and single-step multi-registry pushes.
    • Standardized registry login and metadata generation.
    • Updated tags to “latest.”
    • Added .env to .gitignore.

Walkthrough

Consolidates and simplifies CI publish workflows for dashboard and state-manager into single multi-arch, multi-registry publish jobs, switches state-manager tests from Python to Go, adds a new Publish State Manager workflow, introduces docker-compose services for dashboard and state-manager with healthchecks, and adds .env to .gitignore.

Changes

Cohort / File(s) Summary of Changes
Dashboard publish workflow
.github/workflows/publish-dashboard.yml
Renamed workflow; removed top-level registry/env outputs; merged per-registry jobs into one build-and-publish job; standardized step names; fixed registry login to ghcr.io; unified metadata/tags (uses latest and short SHA) for GHCR and Docker Hub; single docker/build-push-action step pushing multi-arch images with SBOM/provenance.
State Manager workflows
.github/workflows/publish-state-mangaer.yml, .github/workflows/publish-state-manager.yml
Replaced Python test/setup with Go-based tests (uses state-manager/go.mod and go test); added a new Publish State Manager Image workflow (test + publish); consolidated publish into a single multi-registry, multi-arch build-and-push flow with metadata, SBOM, and provenance; standardized step names and GHCR/Docker Hub logins.
Local deployment config
docker-compose.yml
Added compose file defining exosphere-state-manager and exosphere-dashboard services with image refs ghcr.io/exospherehost/...:${EXOSPHERE_TAG:-latest}, environment variables (with defaults/required markers), pull/restart policies, ports, depends_on with service_healthy, healthchecks, and a shared exosphere-network bridge.
Repository ignore
.gitignore
Added .env to ignore list; existing temp ignores preserved.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Push as Git Push/Tag
  participant Actions as GitHub Actions
  participant Meta as docker/metadata-action
  participant Builder as docker/build-push-action
  participant GHCR as ghcr.io
  participant DH as Docker Hub

  Push->>Actions: trigger workflow
  Actions->>Actions: checkout → setup QEMU → setup buildx
  Actions->>Meta: generate tags/labels for GHCR & Docker Hub (latest, short SHA)
  Actions->>GHCR: login (ghcr.io)
  Actions->>DH: login (docker hub)
  Actions->>Builder: build & push multi-arch images (linux/amd64, linux/arm64) with SBOM/provenance
  Builder->>GHCR: push images
  Builder->>DH: push images
  Note right of Builder: single combined step pushes to both registries
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

Hop hop — I stitched CI threads so fine,
Tags aligned, two registries in line,
Go tests hum while services wake,
Healthchecks wait for containers to take,
SBOM snug in my rabbit paw — deploy! 🐇

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title Check ❓ Inconclusive The title “issue_426” is merely an issue reference and does not describe any aspect of the changeset or summarize the key change, making it too generic and non-descriptive to be useful for readers scanning pull request history. It fails to communicate that the workflows are being updated to build Docker images only once and reuse them across registries. As such, it cannot be considered an adequate summary of the work. Please update the title to clearly and concisely reflect the primary change, for example “Consolidate Docker image build into a single step for GHCR and DockerHub workflows.”
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed The description clearly explains that the publish-dashboard.yml and publish-state-manager.yml workflows currently build images twice (once for DockerHub and once for GHCR) and that the change aims to build the image only once for reuse, directly matching the changes in the pull request. This makes it clearly related to the changeset.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/publish-state-mangaer.yml (1)

1-101: Replace Go setup with Python setup in the test job
The state-manager directory is a Python project (pyproject.toml, run.py, tests) and has no go.mod. In .github/workflows/publish-state-mangaer.yml, remove the actions/setup-go@v5 step and replace it with actions/setup-python@v4 (e.g. python-version: '3.x'), install dependencies (via pyproject.toml or requirements.txt), and run tests using pytest.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9f55fb5 and acdb38b.

📒 Files selected for processing (2)
  • .github/workflows/publish-dashboard.yml (3 hunks)
  • .github/workflows/publish-state-mangaer.yml (2 hunks)
🧰 Additional context used
🪛 Checkov (3.2.334)
.github/workflows/publish-state-mangaer.yml

[medium] 40-41: Basic Auth Credentials

(CKV_SECRET_4)


[low] 43-44: Base64 High Entropy String

(CKV_SECRET_6)

🪛 Gitleaks (8.28.0)
.github/workflows/publish-state-mangaer.yml

[high] 43-43: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

🔇 Additional comments (10)
.github/workflows/publish-dashboard.yml (5)

1-1: LGTM!

The updated workflow name accurately reflects the broader scope of publishing to multiple registries.


13-13: LGTM!

The job consolidation and step naming updates are clear and align with the PR objective to eliminate duplicate builds. The dual registry login setup is correct.

Also applies to: 22-23, 30-31, 33-38


46-55: Verify the tag change from beta-latest to latest.

The metadata generation correctly covers both registries. However, the tag has been changed from beta-latest to latest, which is not mentioned in the PR objectives. This could affect deployments or downstream systems expecting the beta-latest tag.

Please confirm whether this tag change is intentional and coordinate with stakeholders if any systems depend on the beta-latest tag.


57-66: LGTM!

The build and push configuration correctly consolidates the workflow to build once and push to both registries. The retention of SBOM and provenance generation is good for supply chain security.


1-66: Excellent consolidation of the workflow.

The changes successfully achieve the PR objective of building the Docker image only once while publishing to both GHCR and Docker Hub. The approach using docker/metadata-action with multiple images is the recommended pattern for multi-registry publishing.

.github/workflows/publish-state-mangaer.yml (5)

32-35: LGTM! Go setup is correctly configured.

The switch from Python to Go is properly implemented with idiomatic use of go-version-file to read the version from go.mod.


37-45: Test environment variables are appropriate for testing.

Static analysis tools have flagged the environment variables as potential secrets. These are test credentials and fixtures, not production secrets, so they are safe to include in the workflow:

  • MONGO_URI contains test database credentials
  • STATE_MANAGER_SECRET and SECRETS_ENCRYPTION_KEY are test fixtures

47-80: Excellent consolidation of the publish job.

The workflow now correctly performs authentication for both registries (GHCR and Docker Hub) within a single job, setting the foundation for the single build-and-push operation. This aligns perfectly with the PR objective to eliminate duplicate Docker image builds.


81-91: Perfect implementation of unified metadata generation.

The metadata action correctly generates tags and labels for both registries in a single step, which is the core of eliminating duplicate builds. The tagging strategy (latest + short SHA) provides both a stable reference and version tracking.


92-101: LGTM! Single build-and-push successfully targets both registries.

This step completes the consolidation by building the Docker image once and pushing it to both GHCR and Docker Hub using the unified tags from the metadata step. The multi-platform build (amd64/arm64) with provenance and SBOM enabled follows security best practices.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between acdb38b and 78bc0a6.

📒 Files selected for processing (2)
  • .github/workflows/publish-state-manager.yml (1 hunks)
  • docker-compose.yml (1 hunks)
🧰 Additional context used
🪛 Checkov (3.2.334)
.github/workflows/publish-state-manager.yml

[medium] 40-41: Basic Auth Credentials

(CKV_SECRET_4)


[low] 43-44: Base64 High Entropy String

(CKV_SECRET_6)

🪛 Gitleaks (8.28.0)
.github/workflows/publish-state-manager.yml

[high] 43-43: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

🪛 YAMLlint (1.37.1)
.github/workflows/publish-state-manager.yml

[warning] 3-3: truthy value should be one of [false, true]

(truthy)

🔇 Additional comments (1)
docker-compose.yml (1)

17-21: Healthcheck is valid – image includes Python
The state-manager Dockerfile uses FROM python:3.12-slim-bookworm, so the python binary is present and the healthcheck will succeed.

Likely an incorrect or invalid review comment.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@coderabbitai coderabbitai bot added the enhancement New feature or request label Oct 1, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 78bc0a6 and a06de82.

📒 Files selected for processing (1)
  • .github/workflows/publish-state-manager.yml (1 hunks)
🧰 Additional context used
🪛 Checkov (3.2.334)
.github/workflows/publish-state-manager.yml

[medium] 40-41: Basic Auth Credentials

(CKV_SECRET_4)


[low] 43-44: Base64 High Entropy String

(CKV_SECRET_6)

🪛 Gitleaks (8.28.0)
.github/workflows/publish-state-manager.yml

[high] 43-43: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

🪛 YAMLlint (1.37.1)
.github/workflows/publish-state-manager.yml

[warning] 3-3: truthy value should be one of [false, true]

(truthy)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a06de82 and 9f452c3.

📒 Files selected for processing (2)
  • .gitignore (1 hunks)
  • docker-compose.yml (1 hunks)

Brijesh-Thakkar and others added 2 commits October 1, 2025 07:23
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@NiveditJain
Copy link
Member

Hi @Brijesh-Thakkar

There is an already ongoing PR for this issue here: #430

Lets probably review or contribute to the same.

@NiveditJain NiveditJain closed this Oct 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants